3.152 \(\int \frac{\cos ^3(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx\)

Optimal. Leaf size=75 \[ \frac{i \cos ^4(c+d x)}{4 a d}+\frac{\sin (c+d x) \cos ^3(c+d x)}{4 a d}+\frac{3 \sin (c+d x) \cos (c+d x)}{8 a d}+\frac{3 x}{8 a} \]

[Out]

(3*x)/(8*a) + ((I/4)*Cos[c + d*x]^4)/(a*d) + (3*Cos[c + d*x]*Sin[c + d*x])/(8*a*d) + (Cos[c + d*x]^3*Sin[c + d
*x])/(4*a*d)

________________________________________________________________________________________

Rubi [A]  time = 0.128129, antiderivative size = 75, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.194, Rules used = {3092, 3090, 2635, 8, 2565, 30} \[ \frac{i \cos ^4(c+d x)}{4 a d}+\frac{\sin (c+d x) \cos ^3(c+d x)}{4 a d}+\frac{3 \sin (c+d x) \cos (c+d x)}{8 a d}+\frac{3 x}{8 a} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^3/(a*Cos[c + d*x] + I*a*Sin[c + d*x]),x]

[Out]

(3*x)/(8*a) + ((I/4)*Cos[c + d*x]^4)/(a*d) + (3*Cos[c + d*x]*Sin[c + d*x])/(8*a*d) + (Cos[c + d*x]^3*Sin[c + d
*x])/(4*a*d)

Rule 3092

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symb
ol] :> Dist[a^n*b^n, Int[Cos[c + d*x]^m/(b*Cos[c + d*x] + a*Sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, m},
x] && EqQ[a^2 + b^2, 0] && ILtQ[n, 0]

Rule 3090

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_.), x_Sym
bol] :> Int[ExpandTrig[cos[c + d*x]^m*(a*cos[c + d*x] + b*sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d}, x] &&
 IntegerQ[m] && IGtQ[n, 0]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2565

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> -Dist[(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \int \frac{\cos ^3(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx &=-\frac{i \int \cos ^3(c+d x) (i a \cos (c+d x)+a \sin (c+d x)) \, dx}{a^2}\\ &=-\frac{i \int \left (i a \cos ^4(c+d x)+a \cos ^3(c+d x) \sin (c+d x)\right ) \, dx}{a^2}\\ &=-\frac{i \int \cos ^3(c+d x) \sin (c+d x) \, dx}{a}+\frac{\int \cos ^4(c+d x) \, dx}{a}\\ &=\frac{\cos ^3(c+d x) \sin (c+d x)}{4 a d}+\frac{3 \int \cos ^2(c+d x) \, dx}{4 a}+\frac{i \operatorname{Subst}\left (\int x^3 \, dx,x,\cos (c+d x)\right )}{a d}\\ &=\frac{i \cos ^4(c+d x)}{4 a d}+\frac{3 \cos (c+d x) \sin (c+d x)}{8 a d}+\frac{\cos ^3(c+d x) \sin (c+d x)}{4 a d}+\frac{3 \int 1 \, dx}{8 a}\\ &=\frac{3 x}{8 a}+\frac{i \cos ^4(c+d x)}{4 a d}+\frac{3 \cos (c+d x) \sin (c+d x)}{8 a d}+\frac{\cos ^3(c+d x) \sin (c+d x)}{4 a d}\\ \end{align*}

Mathematica [A]  time = 0.10056, size = 60, normalized size = 0.8 \[ \frac{8 \sin (2 (c+d x))+\sin (4 (c+d x))+4 i \cos (2 (c+d x))+i \cos (4 (c+d x))+12 c+12 d x}{32 a d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^3/(a*Cos[c + d*x] + I*a*Sin[c + d*x]),x]

[Out]

(12*c + 12*d*x + (4*I)*Cos[2*(c + d*x)] + I*Cos[4*(c + d*x)] + 8*Sin[2*(c + d*x)] + Sin[4*(c + d*x)])/(32*a*d)

________________________________________________________________________________________

Maple [A]  time = 0.115, size = 98, normalized size = 1.3 \begin{align*}{\frac{-{\frac{3\,i}{16}}\ln \left ( \tan \left ( dx+c \right ) -i \right ) }{ad}}-{\frac{{\frac{i}{8}}}{ad \left ( \tan \left ( dx+c \right ) -i \right ) ^{2}}}+{\frac{1}{4\,ad \left ( \tan \left ( dx+c \right ) -i \right ) }}+{\frac{{\frac{3\,i}{16}}\ln \left ( \tan \left ( dx+c \right ) +i \right ) }{ad}}+{\frac{1}{8\,ad \left ( \tan \left ( dx+c \right ) +i \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3/(a*cos(d*x+c)+I*a*sin(d*x+c)),x)

[Out]

-3/16*I/a/d*ln(tan(d*x+c)-I)-1/8*I/a/d/(tan(d*x+c)-I)^2+1/4/a/d/(tan(d*x+c)-I)+3/16*I/a/d*ln(tan(d*x+c)+I)+1/8
/a/d/(tan(d*x+c)+I)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a*cos(d*x+c)+I*a*sin(d*x+c)),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [A]  time = 0.467277, size = 159, normalized size = 2.12 \begin{align*} \frac{{\left (12 \, d x e^{\left (4 i \, d x + 4 i \, c\right )} - 2 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 6 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i\right )} e^{\left (-4 i \, d x - 4 i \, c\right )}}{32 \, a d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a*cos(d*x+c)+I*a*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/32*(12*d*x*e^(4*I*d*x + 4*I*c) - 2*I*e^(6*I*d*x + 6*I*c) + 6*I*e^(2*I*d*x + 2*I*c) + I)*e^(-4*I*d*x - 4*I*c)
/(a*d)

________________________________________________________________________________________

Sympy [A]  time = 0.438954, size = 153, normalized size = 2.04 \begin{align*} \begin{cases} \frac{\left (- 512 i a^{2} d^{2} e^{8 i c} e^{2 i d x} + 1536 i a^{2} d^{2} e^{4 i c} e^{- 2 i d x} + 256 i a^{2} d^{2} e^{2 i c} e^{- 4 i d x}\right ) e^{- 6 i c}}{8192 a^{3} d^{3}} & \text{for}\: 8192 a^{3} d^{3} e^{6 i c} \neq 0 \\x \left (\frac{\left (e^{6 i c} + 3 e^{4 i c} + 3 e^{2 i c} + 1\right ) e^{- 4 i c}}{8 a} - \frac{3}{8 a}\right ) & \text{otherwise} \end{cases} + \frac{3 x}{8 a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3/(a*cos(d*x+c)+I*a*sin(d*x+c)),x)

[Out]

Piecewise(((-512*I*a**2*d**2*exp(8*I*c)*exp(2*I*d*x) + 1536*I*a**2*d**2*exp(4*I*c)*exp(-2*I*d*x) + 256*I*a**2*
d**2*exp(2*I*c)*exp(-4*I*d*x))*exp(-6*I*c)/(8192*a**3*d**3), Ne(8192*a**3*d**3*exp(6*I*c), 0)), (x*((exp(6*I*c
) + 3*exp(4*I*c) + 3*exp(2*I*c) + 1)*exp(-4*I*c)/(8*a) - 3/(8*a)), True)) + 3*x/(8*a)

________________________________________________________________________________________

Giac [A]  time = 1.12508, size = 134, normalized size = 1.79 \begin{align*} -\frac{\frac{6 i \, \log \left (i \, \tan \left (d x + c\right ) + 1\right )}{a} - \frac{6 i \, \log \left (i \, \tan \left (d x + c\right ) - 1\right )}{a} + \frac{2 \,{\left (3 \, \tan \left (d x + c\right ) + 5 i\right )}}{a{\left (-i \, \tan \left (d x + c\right ) + 1\right )}} + \frac{-9 i \, \tan \left (d x + c\right )^{2} - 26 \, \tan \left (d x + c\right ) + 21 i}{a{\left (\tan \left (d x + c\right ) - i\right )}^{2}}}{32 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a*cos(d*x+c)+I*a*sin(d*x+c)),x, algorithm="giac")

[Out]

-1/32*(6*I*log(I*tan(d*x + c) + 1)/a - 6*I*log(I*tan(d*x + c) - 1)/a + 2*(3*tan(d*x + c) + 5*I)/(a*(-I*tan(d*x
 + c) + 1)) + (-9*I*tan(d*x + c)^2 - 26*tan(d*x + c) + 21*I)/(a*(tan(d*x + c) - I)^2))/d